<template>
    <div class="singer-card">
        <div class="header">
            <div class="title">{{ title }}</div>
            <div class="more">更多></div>
        </div>
        <div class="list">
            <div class="item" v-for="item in dataList" :key="item.id">
                <img :src="require(`../../assets/images/${item.name}.jpg`)">
                <span @click="singer(item.id)">{{ item.name }}</span><i></i>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    props: {
        title: String,
        dataList: Array
    },
    methods: {
      singer(id){
        this.$router.push({path:`/singerinttroduce/${id}`});
      }
    },
}
</script>

<style lang="less" scoped>
    .singer-card {
        .header {
            display: flex;
            justify-content: space-between;
            height: 40px;
            border-bottom: 2px solid #c20c0c;
            .title {
                font-size: 24px;
                font-weight: normal;
                color: #333;
            }
            .more {
                line-height: 40px;
                color: #666;
            }
        }
        .list {
            display: flex;
            flex-wrap: wrap;
            margin-top: 20px;
            width: 100%;
            .item {
                text-align: center;
                width: 20%;
                padding-bottom: 30px;
                box-sizing: border-box;
                img {
                    width: 130px;
                    height: 130px;
                }
                span {
                    display: block;
                    margin: 5px auto;
                    width: 130px;
                    color: #333;
                    display: flex;
                    justify-content: space-between;
                    i {
                        display: block;
                        width: 17px;
                        height: 18px;
                        background: url(../../assets/images/icon.png) no-repeat 0 -740px;
                    }
                    &:hover {
                        color: #333 !important;
                    }
                }
            }
        }
    }
</style>